In this specification any reference to a “mask” is to be understood as including all forms of devices for passing breathable gas to a person's airway, including nose masks, nose and mouth masks, nasal prongs/pillows and endotracheal or tracheostomy tubes.
During mechanical ventilation, breathable gas is supplied for example via a mask, at a pressure which is higher during inspiration and lower during expiration. It is useful to measure the subject's respiratory airflow during mechanical ventilation to assess adequacy of treatment, or to control the operation of the ventilator.
Respiratory airflow is commonly measured with a pneumotachograph placed in the gas delivery path between the mask and the ventilator. Leaks between the mask and the subject are unavoidable. The pneumotachograph measures the sum of the respiratory airflow plus the flow through the leak. If the instantaneous flow through the leak is known, the respiratory airflow can be calculated by subtracting the flow through the leak from the flow at the pneumotach.
Known methods to correct for the flow through the leak assume (i) that the leak is substantially constant, and (ii) that over a sufficiently long time, inspiratory and expiratory respiratory airflow will cancel. If these assumnptions are met, the average flow through the pneumotach over a sufficiently long period will equal the magnitude of the leak, and the true respiratory airflow may then be calculated as described.
The known method is only correct if the pressure at the mask is constant. If the mask pressure varies with time (for example, in the case of a ventilator), assumption (i) above will be invalid, and the calculated respiratory airflow will therefore be incorrect. This is shown markedly in FIGS. 1a-1f. 
FIG. 1a shows a trace of measured mask pressure in bi-level CPAP treatment between about 4 cm H2O on expiration and 12 cm H2O on inspiration. FIG. 1b shows a trace of true respiratory airflow in synchronism with the mask pressures. At time=21 seconds a mask leak occurs, resulting in a leakage flow from the leak that is a function of the treatment pressure, as shown in FIG. 1c. The measured mask flow shown in FIG. 1d now includes an offset due to the leak flow. The prior art method then determines the calculated leak flow over a number of breaths, as shown in FIG. 1e. The resulting calculated respiratory flow, as the measured flow minus the calculating leak flow is shown in FIG. 1f, having returned to the correct mean value, however is incorrectly scaled in magnitude, giving a false indication of peak positive and negative airflow.
Another prior art arrangement is disclosed in European Publication No. 0 714 670 A2, including a calculation of a pressure-dependent leak component. The methodology relies on knowing precisely the occurrence of the start of an inspiratory event and the start of the next inspiratory event. In other words, the leak calculation is formed as an average over a known breath and applied to a subsequent breath.
This method cannot be used if the moment of start and end of the previous breath are unknown. In general, it can be difficult to accurately calculate the time of start of a breath. This is particularly the case immediately following a sudden change in the leak.
Furthermore, the method will not work in the case of a subject who is making no respiratory efforts, and is momentarily not being ventilated at all, for example during an apnea, because for the duration of the apnea there is no start or end of breath over which to make a calculation.
The present invention seeks to provide a determination of leak flow and true respiratory airflow, accounting for the variations in flow through a leak as a function of pressure.